import { Component } from '@angular/core';
import {TranslateService} from '@ngx-translate/core';
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html'
})
export class AppComponent {
  title = 'app';
  constructor(private translate: TranslateService){
    translate.setDefaultLang('zh-CN');
   // let broswerLang = translate.getBrowserLang();
   // translate.use(broswerLang.match(/en|cn/) ? broswerLang : 'en');
    let broswerLang = translate.getBrowserLang();
    console.log("broswerLang------>",broswerLang);
    translate.use('zh-CN');
  }
}
